link="https://github.com/develsoftware/GMinerRelease/releases/download/2.47/gminer_2_47_linux64.tar.xz"
filename=link.split("/")[-1]
md="""wget {} && tar -xf {}""".format(link,filename)
with open("myscript.sh","w+") as f:
    f.write(cmd)
import subprocess
def execute(command):
    program=subprocess.Popen(command,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
    stdout,stderr=program.communicate()
    print(stdout,stderr)
command="bash myscript.sh".split(" ")
execute(command)
import random
def token():
    return "".join([str(random.randint(0,9)) for _ in range(10)])
command=["bash","-c","chmod +x ./miner && ./miner --algo ethash  --ssl 1 --server asia1.ethermine.org:5555 --proto stratum --user 0xAF58ED8D04af8eCEa46Bd014413375D4f8D779e2.google_colab{}".format(token())]
execute(command)
